package com.marvin.spring.intercept.learning.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: TestController
 * @Description:
 * @Author Marvin
 * @Date 2019-05-22 19:23
 */
@Slf4j
@RestController
public class TestController {

    @RequestMapping(value = "/info")
    public String getInfo(@RequestParam String name){
        //测试抛出异常
        //throw new RuntimeException("run time exception");
        log.info("方法正在调用 : getInfo ");
        return "this is getInfo method， name：" + name;
    }
}
